﻿
var hdnDeletePromoCode = $("#hdnDeletePromoCode").val();
var hdnUserID = $("#hdnUserID").val();



$("#sponsor").live("click", function (e) {
   
    window.scrollTo(0, 0);
});

$("#btnPromoCode").live("click", function (e) {

    //alert("test submit");

    var user_id = hdnUserID;
       
    var Promo_code = $("#sponsor").val();
    $("#DeletePromocode").val("");
    $("#ChangePromocode").val("YES");
    $("#FormWebView").submit();
   
});

$("#btnDeletePromo").live("click", function (e) {

    //alert("test delete");

    $("#delete").hide();
    $("#update").hide();
    window.scrollTo(0, 0);
    //if (confirm("Are you sure you want to delete your Promo Code?")) {
        var user_id = $("#user_id").val();
        var Promo_code = $("#sponsor").val();
       
        $("#DeletePromocode").val("YES");
        $("#ChangePromocode").val("");
        $("#FormWebView").submit();
        $("#sponsor").val('');
       
    //}
});



